package com.example.webmodule.strategy;

import com.alibaba.nacos.api.exception.NacosException;
import com.example.webmodule.entity.ApiPathVo;
import com.example.webmodule.entity.ServiceInfo;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface RegistrySelectStrategy {

    void init() throws NacosException;
    /**
     * 获取服务
     * @return
     * @throws Exception
     */
    List<String> getServices();

    /**
     * 获取服务实例信息
     * @param serviceName
     * @return
     * @throws Exception
     */
    List<ServiceInfo> getServiceInstances(String serviceName) throws Exception;

    /**
     * 获取服务接口信息
     * @param serviceInfo
     * @return
     * @throws IOException
     */
    List<ApiPathVo> fetchApiPaths(ServiceInfo serviceInfo);

    void subscribe(String serviceName);
}
